Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
from "p" to a "list"

Good day!

I am using WordPress and this plugin outputs products in one p tag and separates them with a semicolon as in the image.

I was wondering if it is possible somehow to take the values of that p tag and output them in a list? One under the other?

Or perhaps this is a JavaScript question? Or maybe even I should fiddle with the WordPress plugin itself?

I will appreciate any help or hints!

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could use a simple script like this to extract the text content of p, separate each entry after each semicolon and map with p tags:

const parent = document.querySelector("dd.variation-bundledProducts")

const elems = document.querySelector("dd.variation-bundledProducts p").textContent.split(";").map(el => `<p>${el}</p>`).join("");

parent.innerHTML = elems
<dd class="variation-bundledProducts">
  <p>
    element1; element2; element3; element4
  </p>
</dd>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda